home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Tools / BNDL Banger v.1.3 ƒ / BNDL Banger v.1.3 info < prev    next >
Text File  |  1992-08-31  |  10KB  |  136 lines

  1. New version!  Users of older versions of BNDL Banger will be most interested in the following changes that are part of v.1.3:
  2.  
  3. 1) Added a little bit of code to avoid a crash if just the right set of inits are installed.  The crash isn't exactly my fault, but I'm the one that crashes and I can kludge around it, so I did.  This crash would _ONLY_ show up if you selected the "Bang Something…" menu item from the "Banger" menu — and then ONLY if File Sharing was on _AND_ a certain commercially available extension was active.
  4.  
  5. 2) Added a little bit of code to avoid hanging if the target volume was a server.
  6.  
  7. 3) Cleaned up my heap a little, cutting out some fragmentation, wasting less space, etc.
  8.  
  9. 4) (fixed in v.1.2) BNDL Banger now handles more than just applications (since more than just applications are likely to have a BNDL).  Potential items to bang are filtered in the StandardGetFile dialog based on whether or not their "hasBundle" Finder info bit is set - if it's set, they show up in the StandardGetFile dialog.  If it's NOT set, and you're using drag & drop, the file is simply ignored.
  10.  
  11. 5) (fixed in v.1.2) Changed algorithm used in the "BangIt()" routine to a more reliable one.  A side effect of this is that multiple beeps may be heard while banging an application.  Version 1.0 only called PBDTRemoveAPPL() once (for the incoming application), but it should have been called once for each copy of the application with the same creator type that's found on the incoming application's volume.  Now, there's one beep as each copy of an application is removed from the desktop database.
  12.  
  13. General description:
  14. I've been endlessly annoyed by what a pain it can be to get the system to recognize changes you make to your app's icon, document icons, etc (all the stuff that's linked via the BNDL resource).  CDev authors, INIT authors, Extension authors and many others have also probably been through this same hassle.
  15.  
  16. Without BNDL Banger, the best case situation (one hard drive, one copy of the app under development), still means you have to reboot _AND_ rebuild your desktop.  On a large capacity drive (100megs and up), this takes a while and often discourages developers from making minor tweaks to icons (it's just not worth the hassle of rebuilding the desktop sometimes).
  17.  
  18. BNDL Banger is a little app that tricks the system into using your selected app's BNDL-related info ("tricks" = rips the old BNDL info out of the desktop database and gently coerces the new BNDL info back in...).  It copes with the situation where you have multiple copies of your app laying around (using the BNDL from the copy of the app YOU requested) and eliminates the need to rebuild the desktop file (you do have to reboot though - there's practically no way to avoid that).
  19.  
  20. I did say "practically no way to avoid rebooting" — which means you can sort of avoid it.  If you're just changing icons, then Get info on your application, click on the icon in the Info window, select COPY from the Edit menu, select PASTE from the Edit menu, select CUT from the edit menu — your new icon will probably show up now.  
  21.  
  22. Why does this work?  The Finder caches icons to help speed things up.  When you selected PASTE, you gave the app a custom icon.  Selecting CUT removed that icon and forced the Finder to re-read the app's actual icon (from the desktop database) instead of using the version it used to have cached.  The same trick works for document icons, but you'll have to Get Info on each type of document that you want to trick the Finder into re-reading.
  23.  
  24. Sorry, but there's no way to automate this process (the Finder's current level of Apple event support doesn't come close to being able to allow something like this to be done via Apple events).
  25.  
  26. It's still a _LOT_ less hassle to just reboot.  But, if you're determined not to reboot, you can force the Finder to restart by pressing Command-Option-Shift-Esc.  Make sure all other apps have already been quit and make sure File Sharing is _OFF_ (or you can encounter other problems).  Like I said, it's a LOT less hassle to just reboot.  After all, the big time hit (rebuilding the desktop database) has been eliminated.
  27.  
  28. The only remaining "hole" is that if your BNDL to be banged lives on the boot volume AND another volume, but you bang the "other" volume's copy of the app, you'll still see the OLD information (because the boot volume is searched first, then the next volume, etc).  You can have this problem any time you have more than one drive.  This problem is addressed in "BNDL Banger Pro" which you can order from me for seven dollars (see the 'Read Me' file for details on the features in 'BNDL Banger Pro' and for information on where to send your seven dollars - complete Think C v.5.0.2 source code to both BNDL Banger v.1.3 and BNDL Banger Pro is included on the disk you get when you send your seven dollars).
  29.  
  30. BNDL Banger v.1.3 is FreeWare.  BNDL Banger Pro is _NOT_ FreeWare (it's "commercial" and can't be uploaded).  BNDL Banger Pro v.2.1 can be purchased by sending $7 (US) to:
  31.  
  32. Tim Swihart
  33. Swihart's Software
  34. P.O. Box 160643
  35. Cupertino, CA  95016
  36.  
  37.  
  38. Enjoy,
  39. Tim S.
  40. co-author, "Programming for System 7" (part of Addison Wesley's "Macintosh Inside
  41. Out" series)
  42.  
  43.  
  44. ------ techie info below ------
  45.  
  46.  
  47.     Changes since version 1.2:
  48.     • Version number bumped to 1.3.
  49.  
  50.     • Simplified HandleOAPP() to eliminate code that wasn't really needed.  We saved
  51.       only a few bytes of memory, but every little bit helps.
  52.  
  53.     • Added a filterProc to all calls to Alert().  The filterProc's sole goal in 
  54.       life is to redraw the bold outline around the default button during update
  55.       events.  Otherwise, it's possible to have part of the outline erased by
  56.       balloons that pop up on top of that bold outline.  The system draws the 
  57.       original bold outline, but doesn't bother to redraw it during updates.  I
  58.       avoided most of this problem originally by carefully setting _MY_ balloons
  59.       to behave like menus (buffering and replacing the area they're drawn over),
  60.       but balloons posted by the system (like those that are put up for windows
  61.       in another layer) don't bother to restore the stuff they draw on top of.
  62.       Personally, I consider this lack of redrawing to be a system bug, but it's 
  63.       been broken forever and nobody seems interested in fixing it.  Since it makes 
  64.       my app look bad, I'm kludging around it.  This filterProc adds about a hundred
  65.       bytes to the size of the final app.
  66.  
  67.     • Added an extra test while we're checking to see if the target volume can be banged.
  68.       Previously, we only looked to see if it had a desktop database, now we also check
  69.       to see if the target volume is NOT a server (servers can't be banged and thus do 
  70.       NOT have a "suitable" desktop database).  The change fixes the bug where BNDL 
  71.       Banger would hang if it attempted to bang a file that lived on a server.
  72.  
  73.     • "preload" removed from menu item resources to avoid fragmenting the heap.
  74.  
  75.     • Modified FilterOutNonBNDLs() to handle the case where the incoming parm block
  76.       pointer is NIL (it should never be NIL, but with a certain third-party init installed     
  77.       and File Sharing on, one of my Macs gets NIL for this pointer which caused a crash…).
  78.  
  79.     • Removed call to MoreMasters() in Initialize() since I didn't really need more than
  80.       the default…
  81.  
  82.     • Moved these notes from the various source files to the Read Me file.  Now, we
  83.       don't have to wait for the compiler to wade through them and they're easier
  84.       to keep current (some of the files had redundant information in the notes, so
  85.       this also makes the whole thing a little smaller).
  86.  
  87.  
  88.     Changes since version 1.1:
  89.     • Version number bumped to 1.2.
  90.  
  91.     • Renamed "Bang Application…" item in "Banger" menu to "Bang Something…".  This 
  92.       better reflects the fact that BNDL Banger now handles more than just applications
  93.       (since more than just applications are likely to have a BNDL resource).  Potential
  94.       items to bang are filtered in the StandardGetFile dialog based on whether or not
  95.       their "hasBundle" is set - if it's set, they show up in the StandardGetFile 
  96.       dialog.  If it's NOT set, and you're using drag & drop, the file is simply ignored.
  97.       Credit for this idea goes to a fellow developer (thanks for the idea Cory!).
  98.  
  99.     • Tweaked some balloon messages for clarity.  All of these changes are in
  100.       the Balloons.r file.
  101.  
  102.     • Reworded some of the text in the About box and the "tutorial" dialogs to reflect
  103.       the fact that BNDL Banger Pro can bang any file with a bundle instead of just
  104.       applications.
  105.  
  106.     • Added call to InitCursor() when resuming after being sent to background.  This 
  107.       fixed the problem where you would occassionally have the wrong mouse pointer in
  108.       BNDL Banger and BNDL Banger Pro.
  109.  
  110.     • Tweaked amount of RAM requested for "preferred" and "minimum" size partitions
  111.       under MultiFinder (we now use 60K, we could probably get by with less, so try 
  112.       less if your system is tight on memory).
  113.  
  114.  
  115.     Changes since version 1.0:
  116.     • Version number bumped to 1.1.
  117.  
  118.     • Fixed crash when launching under pre-System 7.0.  The check for whether or not
  119.       we're running under System 7 was being done AFTER trying to append an item to
  120.       the Help menu, so I swapped the order of these two actions.  The only routine 
  121.       affected by this fix was "Initialize()".
  122.  
  123.     • Corrected a comment in "Initialize()" to more accurately reflect what a called
  124.       routine was expected to do for us.
  125.  
  126.     • Changed algorithm used in the "BangIt()" routine to a more reliable one.  A side
  127.       effect of this is that multiple beeps may be heard while banging an application.
  128.       Version 1.0 only called PBDTRemoveAPPL() once (for the incoming application), 
  129.       but it should have been called once for each copy of the application with the
  130.       same creator type that's found on the incoming application's volume.  Now, there's
  131.       one beep as each copy of an application is removed from the desktop database.  If
  132.       there are three copies of the application on the volume, three beeps are heard.
  133.  
  134.     • Tweaked some of the balloon messages for clarity.  All of these changes are in
  135.       the Balloons.r file.
  136.